Fix some doxygen warnings
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Tue, 5 Jan 2010 21:24:23 +0000 (21:24 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Tue, 5 Jan 2010 21:24:23 +0000 (21:24 +0000)
includes/AuthPlugin.php
includes/BacklinkCache.php
includes/CacheDependency.php
includes/ChangesList.php

index eacabd4..87ac8ad 100644 (file)
@@ -98,7 +98,7 @@ class AuthPlugin {
         * The User object is passed by reference so it can be modified; don't
         * forget the & on your function declaration.
         *
-        * @param User $user
+        * @param $user User object
         */
        public function updateUser( &$user ) {
                # Override this and do something
@@ -117,7 +117,7 @@ class AuthPlugin {
         *
         * This is just a question, and shouldn't perform any actions.
         *
-        * @return bool
+        * @return Boolean
         */
        public function autoCreate() {
                return false;
@@ -128,7 +128,7 @@ class AuthPlugin {
         * and use the same keys. 'Realname' 'Emailaddress' and 'Nickname'
         * all reference this.
         *
-        * @return bool
+        * @return Boolean
         */
        public function allowPropChange( $prop = '' ) {
                if( $prop == 'realname' && is_callable( array( $this, 'allowRealNameChange' ) ) ) {
@@ -172,7 +172,7 @@ class AuthPlugin {
         * Return true if successful.
         *
         * @param $user User object.
-        * @return bool
+        * @return Boolean
         */
        public function updateExternalDB( $user ) {
                return true;
@@ -181,7 +181,7 @@ class AuthPlugin {
        /**
         * Check to see if external accounts can be created.
         * Return true if external accounts can be created.
-        * @return bool
+        * @return Boolean
         */
        public function canCreateAccounts() {
                return false;
@@ -191,11 +191,11 @@ class AuthPlugin {
         * Add a user to the external authentication database.
         * Return true if successful.
         *
-        * @param User $user - only the name should be assumed valid at this point
-        * @param string $password
-        * @param string $email
-        * @param string $realname
-        * @return bool
+        * @param $user User: only the name should be assumed valid at this point
+        * @param $password String
+        * @param $email String
+        * @param $realname String
+        * @return Boolean
         */
        public function addUser( $user, $password, $email='', $realname='' ) {
                return true;
@@ -208,7 +208,7 @@ class AuthPlugin {
         *
         * This is just a question, and shouldn't perform any actions.
         *
-        * @return bool
+        * @return Boolean
         */
        public function strict() {
                return false;
@@ -219,7 +219,7 @@ class AuthPlugin {
         * If either this or strict() returns true, local authentication is not used.
         *
         * @param $username String: username.
-        * @return bool
+        * @return Boolean
         */
        public function strictUserAuth( $username ) {
                return false;
@@ -234,7 +234,7 @@ class AuthPlugin {
         * forget the & on your function declaration.
         *
         * @param $user User object.
-        * @param $autocreate bool True if user is being autocreated on login
+        * @param $autocreate Boolean: True if user is being autocreated on login
         */
        public function initUser( &$user, $autocreate=false ) {
                # Override this to do something.
@@ -252,7 +252,6 @@ class AuthPlugin {
         * Get an instance of a User object
         *
         * @param $user User
-        * @public
         */
        public function getUserInstance( User &$user ) {
                return new AuthPluginUser( $user );
index ff1a1a3..e445145 100644 (file)
@@ -47,7 +47,9 @@ class BacklinkCache {
 
        /**
         * Get the backlinks for a given table. Cached in process memory only.
-        * @param string $table
+        * @param $table String
+        * @param $startId Integer or false
+        * @param $endId Integer or false
         * @return TitleArray
         */
        public function getLinks( $table, $startId = false, $endId = false ) {
@@ -169,9 +171,9 @@ class BacklinkCache {
         * Returns an array giving the start and end of each range. The first batch has
         * a start of false, and the last batch has an end of false.
         *
-        * @param string $table The links table name
-        * @param integer $batchSize
-        * @return array
+        * @param $table String: the links table name
+        * @param $batchSize Integer
+        * @return Array
         */
        public function partition( $table, $batchSize ) {
                // Try cache
index 8bd0be4..9b5ab45 100644 (file)
@@ -12,8 +12,8 @@ class DependencyWrapper {
 
        /**
         * Create an instance.
-        * @param mixed $value The user-supplied value
-        * @param mixed $deps A dependency or dependency array. All dependencies
+        * @param $value Mixed: the user-supplied value
+        * @param $deps Mixed: a dependency or dependency array. All dependencies
         *        must be objects implementing CacheDependency.
         */
        function __construct( $value = false, $deps = array() ) {
@@ -66,12 +66,12 @@ class DependencyWrapper {
         * it will be generated with the callback function (if present), and the newly
         * calculated value will be stored to the cache in a wrapper.
         *
-        * @param object $cache A cache object such as $wgMemc
-        * @param string $key The cache key
-        * @param integer $expiry The expiry timestamp or interval in seconds
-        * @param mixed $callback The callback for generating the value, or false
-        * @param array $callbackParams The function parameters for the callback
-        * @param array $deps The dependencies to store on a cache miss. Note: these
+        * @param $cache Object: a cache object such as $wgMemc
+        * @param $key String: the cache key
+        * @param $expiry Integer: the expiry timestamp or interval in seconds
+        * @param $callback Mixed: the callback for generating the value, or false
+        * @param $callbackParams Array: the function parameters for the callback
+        * @param $deps Array: the dependencies to store on a cache miss. Note: these
         *    are not the dependencies used on a cache hit! Cache hits use the stored
         *    dependency array.
         *
@@ -120,8 +120,8 @@ class FileDependency extends CacheDependency {
        /**
         * Create a file dependency
         *
-        * @param string $filename The name of the file, preferably fully qualified
-        * @param mixed $timestamp The unix last modified timestamp, or false if the
+        * @param $filename String: the name of the file, preferably fully qualified
+        * @param $timestamp Mixed: the unix last modified timestamp, or false if the
         *        file does not exist. If omitted, the timestamp will be loaded from
         *        the file.
         *
@@ -185,7 +185,7 @@ class TitleDependency extends CacheDependency {
 
        /**
         * Construct a title dependency
-        * @param Title $title
+        * @param $title Title
         */
        function __construct( Title $title ) {
                $this->titleObj = $title;
index 7238289..bc776fd 100644 (file)
@@ -29,7 +29,7 @@ class ChangesList {
 
        /**
        * Changeslist contructor
-       * @param Skin $skin
+       * @param $skin Skin
        */
        public function __construct( $skin ) {
                $this->skin = $skin;
@@ -56,7 +56,7 @@ class ChangesList {
        
        /**
         * Sets the list to use a <li class="watchlist-(namespace)-(page)"> tag
-        * @param bool $value
+        * @param $value Boolean
         */
        public function setWatchlistDivs( $value = true ) {
                $this->watchlist = $value;
@@ -78,12 +78,12 @@ class ChangesList {
 
        /**
         * Returns the appropriate flags for new page, minor change and patrolling
-        * @param bool $new
-        * @param bool $minor
-        * @param bool $patrolled
-        * @param string $nothing, string to use for empty space
-        * @param bool $bot
-        * @return string
+        * @param $new Boolean
+        * @param $minor Boolean
+        * @param $patrolled Boolean
+        * @param $nothing String to use for empty space
+        * @param $bot Boolean
+        * @return String
         */
        protected function recentChangesFlags( $new, $minor, $patrolled, $nothing = '&nbsp;', $bot = false ) {
                $f = $new ? self::flag( 'newpage' ) : $nothing;
@@ -99,8 +99,8 @@ class ChangesList {
         * unpatrolled edit.  By default in English it will contain "N", "m", "b",
         * "!" respectively, plus it will have an appropriate title and class.
         *
-        * @param $key string 'newpage', 'unpatrolled', 'minor', or 'bot'
-        * @return string Raw HTML
+        * @param $key String: 'newpage', 'unpatrolled', 'minor', or 'bot'
+        * @return String: Raw HTML
         */
        public static function flag( $key ) {
                static $messages = null;
@@ -128,8 +128,8 @@ class ChangesList {
         * explaining what the flags mean.  For instance, "N - new page".  See
         * also flag().
         *
-        * @param $key string 'newpage', 'unpatrolled', 'minor', or 'bot'
-        * @return string Raw HTML
+        * @param $key String: 'newpage', 'unpatrolled', 'minor', or 'bot'
+        * @return String: Raw HTML
         */
        private static function flagLine( $key ) {
                return wfMsgExt( "recentchanges-legend-$key", array( 'escapenoentities',
@@ -139,7 +139,7 @@ class ChangesList {
        /**
         * A handy legend to tell users what the little "m", "b", and so on mean.
         *
-        * @return string Raw HTML
+        * @return String: Raw HTML
         */
        public static function flagLegend() {
                global $wgGroupPermissions, $wgLang;
@@ -166,7 +166,7 @@ class ChangesList {
 
        /**
         * Returns text for the start of the tabular part of RC
-        * @return string
+        * @return String
         */
        public function beginRecentChangesList() {
                $this->rc_cache = array();
@@ -179,9 +179,9 @@ class ChangesList {
        
        /**
         * Show formatted char difference
-        * @param int $old bytes
-        * @param int $new bytes
-        * @returns string
+        * @param $old Integer: bytes
+        * @param $new Integer: bytes
+        * @returns String
         */
        public static function showCharacterDifference( $old, $new ) {
                global $wgRCChangedSizeThreshold, $wgLang, $wgMiserMode;
@@ -215,7 +215,7 @@ class ChangesList {
 
        /**
         * Returns text for the end of RC
-        * @return string
+        * @return String
         */
        public function endRecentChangesList() {
                if( $this->rclistOpen ) {
@@ -404,7 +404,7 @@ class ChangesList {
 
        /**
         * Check whether to enable recent changes patrol features
-        * @return bool
+        * @return Boolean
         */
        public static function usePatrol() {
                global $wgUser;
@@ -430,9 +430,9 @@ class ChangesList {
 
        /**
         * Determine if said field of a revision is hidden
-        * @param RCCacheEntry $rc
-        * @param int $field one of DELETED_* bitfield constants
-        * @return bool
+        * @param $rc RCCacheEntry
+        * @param $field Integer: one of DELETED_* bitfield constants
+        * @return Boolean
         */
        public static function isDeleted( $rc, $field ) {
                return ( $rc->mAttribs['rc_deleted'] & $field ) == $field;
@@ -441,9 +441,9 @@ class ChangesList {
        /**
         * Determine if the current user is allowed to view a particular
         * field of this revision, if it's marked as deleted.
-        * @param RCCacheEntry $rc
-        * @param int $field
-        * @return bool
+        * @param $rc RCCacheEntry
+        * @param $field Integer
+        * @return Boolean
         */
        public static function userCan( $rc, $field ) {
                if( $rc->mAttribs['rc_type'] == RC_LOG ) {
@@ -591,9 +591,9 @@ class OldChangesList extends ChangesList {
  */
 class EnhancedChangesList extends ChangesList {
        /**
-        Add the JavaScript file for enhanced changeslist
-       *  @ return string
-       */
+        * Add the JavaScript file for enhanced changeslist
+        * @return String
+        */
        public function beginRecentChangesList() {
                global $wgStylePath, $wgStyleVersion;
                $this->rc_cache = array();
@@ -1021,10 +1021,10 @@ class EnhancedChangesList extends ChangesList {
 
        /**
         * Generate HTML for an arrow or placeholder graphic
-        * @param string $dir one of '', 'd', 'l', 'r'
-        * @param string $alt text
-        * @param string $title text
-        * @return string HTML <img> tag
+        * @param $dir String: one of '', 'd', 'l', 'r'
+        * @param $alt String: text
+        * @param $title String: text
+        * @return String: HTML <img> tag
         */
        protected function arrow( $dir, $alt='', $title='' ) {
                global $wgStylePath;
@@ -1037,7 +1037,7 @@ class EnhancedChangesList extends ChangesList {
        /**
         * Generate HTML for a right- or left-facing arrow,
         * depending on language direction.
-        * @return string HTML <img> tag
+        * @return String: HTML <img> tag
         */
        protected function sideArrow() {
                global $wgContLang;
@@ -1048,7 +1048,7 @@ class EnhancedChangesList extends ChangesList {
        /**
         * Generate HTML for a down-facing arrow
         * depending on language direction.
-        * @return string HTML <img> tag
+        * @return String: HTML <img> tag
         */
        protected function downArrow() {
                return $this->arrow( 'd', '-', wfMsg( 'rc-enhanced-hide' ) );
@@ -1056,7 +1056,7 @@ class EnhancedChangesList extends ChangesList {
 
        /**
         * Generate HTML for a spacer image
-        * @return string HTML <img> tag
+        * @return String: HTML <img> tag
         */
        protected function spacerArrow() {
                return $this->arrow( '', codepointToUtf8( 0xa0 ) ); // non-breaking space
@@ -1064,7 +1064,7 @@ class EnhancedChangesList extends ChangesList {
 
        /**
         * Add a set of spaces
-        * @return string HTML <td> tag
+        * @return String: HTML <td> tag
         */
        protected function spacerIndent() {
                return '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
@@ -1072,7 +1072,7 @@ class EnhancedChangesList extends ChangesList {
 
        /**
         * Enhanced RC ungrouped line.
-        * @return string a HTML formated line (generated using $r)
+        * @return String: a HTML formated line (generated using $r)
         */
        protected function recentChangesBlockLine( $rcObj ) {
                global $wgRCShowChangedSize;